package com.suixinsanren.design.command.demo04;

public class FanOpenCommand implements Command {

    private final Fan fan;

    public FanOpenCommand(Fan fan) {
        this.fan = fan;
    }

    @Override
    public void execute() {
        fan.open();
    }

    @Override
    public void undo() {
        fan.close();
    }
}
